package com.ebao.po.qa;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ebao.constants.UserType;

/**
 * @desc 邀请回答
 * @author snow
 * @date 2012-7-10
 */
@Entity
@Table(name = "T_Invite_Answer")
public class TInviteAnswer implements Serializable {

	private static final long serialVersionUID = -1022864957001850889L;
	
	private Long id;
	private TQuestion question;		// 邀请回答的问题
	private UserType inviterType;	// 邀请者类型
	private String inviterId;		// 邀请者Id
	private String inviteDate;		// 邀请日期
	// 站内邀请
	private UserType beInvitedType;	// 被邀请者类型
	private String beInvitedId;		// 被邀请者Id
	// 站外邮件邀请
	private String inviteEmail;		// 站外邀请Email地址

	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(optional = false, targetEntity = TQuestion.class)
	@JoinColumn(name = "question_id")
	public TQuestion getQuestion() {
		return question;
	}

	public void setQuestion(TQuestion question) {
		this.question = question;
	}

	public UserType getInviterType() {
		return inviterType;
	}

	public void setInviterType(UserType inviterType) {
		this.inviterType = inviterType;
	}

	public String getInviterId() {
		return inviterId;
	}

	public void setInviterId(String inviterId) {
		this.inviterId = inviterId;
	}

	public UserType getBeInvitedType() {
		return beInvitedType;
	}

	public void setBeInvitedType(UserType beInvitedType) {
		this.beInvitedType = beInvitedType;
	}

	public String getBeInvitedId() {
		return beInvitedId;
	}

	public void setBeInvitedId(String beInvitedId) {
		this.beInvitedId = beInvitedId;
	}

	public String getInviteEmail() {
		return inviteEmail;
	}

	public void setInviteEmail(String inviteEmail) {
		this.inviteEmail = inviteEmail;
	}

	@Column(length = 18)
	public String getInviteDate() {
		return inviteDate;
	}

	public void setInviteDate(String inviteDate) {
		this.inviteDate = inviteDate;
	}

}
